<div class="row">
	<div class="col-md-7">
		<section id="main">
			<div id="articles-wrapper">
				<?php foreach ($posts as $key => $post): ?>
					
					<?php echo $this->element('post', array('post' => $post)); ?>

				<?php endforeach;?>	
			</div>

			<nav>
				<ul class="pagination">
					<?php 
					if ($this->Paginator->hasPrev()) {
						echo $this->Html->tag('li', $this->Paginator->prev(__('Predchádzajúce')));
					}
					?>
					<?php 
					echo $this->Paginator->numbers(array(
						'separator' => '</li><li>',
						'before' => '<li>',
						'after' => '</li>',
					));
					?>
					<?php 
					if ($this->Paginator->hasNext()) {
						echo $this->Html->tag('li', $this->Paginator->next(__('Nasledujúce')));
					}
					?>
				</ul>
			</nav>
		</section>
	</div>

	<div class="col-md-4 col-md-offset-1">
		<aside>
			<div id="add-article">
				<h3>Pridaj <span class="color-red">príhodu</span></h3>
				<div id="add-post-wrapper">
					<?php echo $this->element('addPostForm', array('category_id'=>POST_CATEGORY_STORY)); ?>
				</div>
				<div id="fb-page-like"class="text-center">
					<?php echo $this->element('facebookPageLike'); ?>
				</div>
			</div>
		</aside>
	</div>

</div>
